package com.serookie.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.management.ValueExp;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author kevintam
 * @version 1.0
 * @date 2021/5/23 16:54
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="订单对象", description="订单")
@TableName(value = "mall_order")
public class Order{

    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "订单id")
    private Integer orderId;
    @ApiModelProperty(value = "用户id")
    private String openid;
    @ApiModelProperty(value = "订单号")
    private String orderNumber;
    @ApiModelProperty(value = "该订单价格")
    private BigDecimal orderPrice;
    @ApiModelProperty(value = "地址id")
    private Integer addressId;
    @ApiModelProperty(value = "订单状态")
    private Integer payStatus;
    @ApiModelProperty(value = "订单的创建时间")
    private Date createTime;
    @ApiModelProperty(value = "订单的修改时间")
    private Date updateTime;
    @ApiModelProperty(value = "订单详情")
    @TableField(exist = false)
    private List<OrderDetails> orderDetailsList;
    @ApiModelProperty(value = "地址详情")
    @TableField(exist = false)
    private Address addresses;
    @TableLogic(value = "1" ,delval = "0")
    @ApiModelProperty("用于逻辑删除的字段")
    private Integer deleted;
    @ApiModelProperty(value = "用户的昵称")
    @TableField(exist = false)
    private String nickName;
}
